package com.test.action;


import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;

public class BaseAction {

	@SuppressWarnings("unchecked")
	public Map getRequest(){
		return (Map) ActionContext.getContext().get("request");
	}
	
	@SuppressWarnings("unchecked")
	public Map getSession()
	{
		return ActionContext.getContext().getSession();
	}
	
	@SuppressWarnings("unchecked")
	public Map getApplication()
	{
		return ActionContext.getContext().getApplication();
	}
	public HttpServletResponse getResponse()
	{
		HttpServletResponse response=ServletActionContext.getResponse();
		response.setContentType("text/xml;charset=utf-8");
		return response;
	}
}
